import { http } from '../../utils/net.js'

Page({
  data: {
    refundId: null,
    bank: null,
    plan: null,
    details: null
  },

  getDataFunc() {
    http({
      url: "/api/index/index?method=refund_plan_details",
      data: {
        id: this.data.refundId
      },
      isShowLoading: true,
      successCb: (res) => {
        console.log(res)
        this.setData({
          bank: res.data.bank,
          plan: res.data.plan,
          details: res.data.details
        })
      }
    })
  },
  onLoad: function (options) {
    this.setData({
      refundId: options.refundId
    })
  },
  onShow: function () {
    this.getDataFunc()
  },
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },
  onPullDownRefresh: function () {
    this.getDataFunc()
  }
})